/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package basiclanguage;

/**
 *
 * @author tandaica0612
 */
public class ThuTuCreateObjAdvance {
    class A{
        public A() {
            System.out.println("This is class A");
            this.inraman();//In ra phuong thuc' cua? lop' thua` ke' no' , diem? nay` # voi' C++
            //C++ thi` se~ in ra phuong thuc' cua? chinh' no' (ke? ca? dung` tu` khoa' virtual)
            //nguyen do C++ la` ngon ngu static binding , con` Java la` ngon ngu~ dynamic binding
            //mac. du` C++ voi' tu` khoa' virtual se~ bien' phuong thuc' thanh` dynamic binding
            //nhung van~ khong the? tuy` chinh? duoc. trong truong` hop. nay`
        }
        public void inraman(){
            System.out.println("This inraman in A");
        }
    }
    class B extends A{
        public B() {
            System.out.println("This is class B");
        }
        @Override
        public void inraman(){
            System.out.println("This inraman in B");
        }
    }
    public static void main(String args[]){

        ThuTuCreateObjAdvance t = new ThuTuCreateObjAdvance();
        t.new B();
    }
}
/*
This is class A
This inraman in B
This is class B
 * */